#ifndef __APP_BUFFER_H
#define __APP_BUFFER_H
#include "app_common.h"
#include "pthread.h"

typedef void *aa;
aa app_buffer_init_1(int capacity);
gate_status_t app_buffer_write_1(aa buffer, char *data, char len);

typedef struct buffer buffer_t;
void app_buffer_deinit(buffer_t *buffer);
buffer_t *app_buffer_init(int capacity);
gate_status_t app_buffer_write(buffer_t *buffer, char *data, char len);
int app_buffer_read(buffer_t *buffer, char data[], int data_size);
#endif
